home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / fmsdisk / defs.h next >
C/C++ Source or Header  |  1997-09-09  |  2KB  |  87 lines

  1.  
  2. /*
  3.  *  DEFS.H
  4.  *
  5.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  6.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  7.  *    DICE-LICENSE.TXT.
  8.  */
  9.  
  10. #define DEBUG 1
  11.  
  12. #include <exec/types.h>
  13. #include <exec/nodes.h>
  14. #include <exec/errors.h>
  15. #include <exec/memory.h>
  16. #include <exec/libraries.h>
  17. #include <devices/trackdisk.h>
  18. #include <dos/dos.h>
  19. #include <dos/dosextens.h>
  20. #include <stdio.h>
  21. #define abs
  22. #include <clib/exec_protos.h>
  23. #include <clib/dos_protos.h>
  24. #include <clib/alib_protos.h>
  25. #include <string.h>
  26. #include <stdio.h>
  27.  
  28. extern struct Library *SysBase;
  29. extern struct DosLibrary *DosBase;
  30. #include <pragmas/exec_pragmas.h>
  31. #include <pragmas/dos_pragmas.h>
  32.  
  33. #define Prototype extern
  34. #define DevCall __geta4 __regargs
  35.  
  36. #define CMD_OPENUNIT    (0x7FF0 & ~TDF_EXTCOM)
  37. #define CMD_CLOSEUNIT    (0x7FF1 & ~TDF_EXTCOM)
  38. #define CMD_KILLPROC    (0x7FF2 & ~TDF_EXTCOM)
  39.  
  40. #define EXT_CHUNK   4096
  41.  
  42. typedef struct Library    LIB;
  43. typedef struct Device    DEV;
  44. typedef struct Process    PROC;
  45. typedef struct MsgPort    PORT;
  46. typedef struct Message    MSG;
  47. typedef struct List    LIST;
  48. typedef struct Node    NODE;
  49. typedef long (*func_ptr)();
  50.  
  51. typedef struct {
  52.     struct  Unit    U;
  53.     UWORD   OpenCnt;
  54.     long    Fh;     /*  file handle         */
  55.     long    Size;    /*  current size        */
  56.     long    Pos;    /*  current position        */
  57.     char    Extended;    /*  file has been extended  */
  58.     char    Reserved;
  59. } NDUnit;
  60.  
  61. typedef struct {
  62.     LIB     Lib;
  63.     NDUnit  Unit[32];
  64. } NDev;
  65.  
  66. typedef struct {
  67.     struct  Message io_Message;
  68.     struct  Device  *io_Device;     /* device node pointer  */
  69.     struct  Unit    *io_Unit;        /* unit (driver private)*/
  70.     UWORD   io_Command;         /* device command */
  71.     UBYTE   io_Flags;
  72.     BYTE    io_Error;            /* error or warning num */
  73.     ULONG   io_Actual;            /* actual number of bytes transferred */
  74.     ULONG   io_Length;            /* requested number bytes transferred*/
  75.     APTR    io_Data;            /* points to data area */
  76.     ULONG   io_Offset;            /* offset for block structured devices */
  77.  
  78.     long    iotd_Count;         /*    (extension)     */
  79.     long    iotd_SecLabel;        /*    (extension)     */
  80. } IOB;
  81.  
  82. extern char DeviceName[];
  83. extern char IdString[];
  84. extern void DUMmySeg(void);
  85. extern void ADevExpunge(void);
  86.  
  87.